package com.basic.modules.ykf.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.basic.common.utils.ParamsModel;
import com.basic.modules.ykf.entity.YkfAccountInputRecordEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.basic.modules.ykf.entity.YkfCustomerShopEntity;
import com.basic.modules.ykf.model.ToBeEnteredRsp;
import com.basic.modules.ykf.model.YkfAccountInputSumModel;
import com.basic.modules.ykf.model.YkfQualityTestingModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 子账号录入记录
 *
 * @author maoheng
 * @email 15738859597@163.com
 * @date 2024-05-31 17:00:21
 */
@Mapper
public interface YkfAccountInputRecordDao extends BaseMapper<YkfAccountInputRecordEntity> {

    List<YkfAccountInputRecordEntity> getSubAccountList(@Param("condition") YkfAccountInputRecordEntity condition);

    List<ToBeEnteredRsp> getSubAccountList2(@Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfAccountInputRecordEntity> dayPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    List<YkfAccountInputRecordEntity> dayList(@Param("dateStart") String dateStart, @Param("dateEnd") String dateEnd);

    IPage<YkfAccountInputRecordEntity> overallPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfAccountInputRecordEntity> overallPage2(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfAccountInputRecordEntity> overallPage3(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    List<YkfAccountInputRecordEntity> overallList(@Param("dateStart") String startDate, @Param("dateEnd") String endDate);

    IPage<YkfAccountInputRecordEntity> warningPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition, @Param("sort") ParamsModel.SortParams sort);

    List<YkfAccountInputRecordEntity> warningList(@Param("dateStart") String startDate, @Param("dateEnd") String endDate);

    IPage<YkfAccountInputRecordEntity> customerDataPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition, @Param("sort") ParamsModel.SortParams sort);

    IPage<YkfAccountInputRecordEntity> customerDataPage2(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition, @Param("sort") ParamsModel.SortParams sort);

    IPage<YkfAccountInputRecordEntity> customerDataPage3(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition, @Param("sort") ParamsModel.SortParams sort);

    IPage<YkfAccountInputRecordEntity> personalCustomerDataPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    List<YkfAccountInputRecordEntity> personalSumCustomerDataPage(@Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfAccountInputRecordEntity> sumCustomerPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfAccountInputRecordEntity> sumCustomerPage2(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfAccountInputRecordEntity> sumCustomerPage3(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    List<YkfAccountInputSumModel> sumCustomer(@Param("condition") YkfAccountInputRecordEntity condition);

    List<YkfAccountInputSumModel> personalSumCustomer(@Param("condition") YkfAccountInputRecordEntity condition);

    List<YkfAccountInputSumModel> sumCustomerNotIgnore(@Param("condition") YkfAccountInputRecordEntity condition, @Param("ignoreType") int ignoreType);

    List<YkfAccountInputRecordEntity> customerNotIgnoreLvl3(@Param("inputRecordIds") List<String> inputRecordIds, @Param("userId") Long userId, @Param("date") Date date, @Param("subAccountId") Long subAccountId, @Param("ignoreType") int ignoreType);

    List<YkfAccountInputRecordEntity> customerNotIgnoreLvl2(@Param("inputRecordIds") List<String> inputRecordIds, @Param("userId") Long userId, @Param("date") Date date, @Param("ignoreType") int ignoreType);

    List<YkfAccountInputRecordEntity> customerNotIgnoreLvl1(@Param("inputRecordIds") List<String> inputRecordIds, @Param("userId") Long userId, @Param("ignoreType") int ignoreType);

    IPage<YkfAccountInputRecordEntity> sumSalesRevenuePage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    BigDecimal sumSalesRevenue(@Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfAccountInputRecordEntity> sumInputCountPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfAccountInputRecordEntity condition);

    BigDecimal sumInputCount(@Param("condition") YkfAccountInputRecordEntity condition);

    IPage<YkfQualityTestingModel> receptionPage(IPage<YkfAccountInputRecordEntity> page, @Param("condition") YkfQualityTestingModel condition);

    List<YkfAccountInputRecordEntity> customerDataList(@Param("dateStart") String dateStart, @Param("dateEnd") String dateEnd);

    List<YkfAccountInputRecordEntity> sumCustomerList(@Param("dateStart") String dateStart, @Param("dateEnd") String dateEnd);

    List<YkfAccountInputRecordEntity> personalCustomerDataList(@Param("userId") Long userId, @Param("dateStart") String dateStart, @Param("dateEnd") String dateEnd);
}
